import React from 'react';
import { BrowserRouter as Router, Route, Link, Switch } from 'react-router-dom'
import Login from './pages/Login'
import 'antd/dist/antd.css'
import AdminIndex from './pages/AdminIndex';

export default function Main() {
  return (
    <>
        <Router>
            <Link to="/login">login</Link>
            <Link to="/index">index</Link>
        </Router>

        <Router>
            <Switch>  
                <Route path="/login" exact component={Login} />
                <Route path="/index" exact component={AdminIndex} />
            </Switch>
        </Router>
    </>
  );
}
